package com.blr.dao;

import com.blr.entity.Role;
import com.blr.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: UserMapper
 * Description:
 * Date: 2022/11/16 PM 6:05:41
 * <p>
 * project: codes
 * package: com.blr.dao
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Mapper
public interface UserMapper {

    /**
     * 根据用户id查询用户角色
     *
     * @param uid 用户 id
     * @return 角色集合
     */
    List<Role> getUserRoleByUid(Integer uid);

    /**
     * 根据用户名查询用户
     *
     * @param username 用户名
     * @return 用户
     */
    User loadUserByUsername(String username);
}
